<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<hr>
<div>
    <!--    取值-->
    <!--/*@thymesVar id="hello" type=""*/-->
    <p th:text="${hello}"></p>
    <!--循环-->
    <!--/*@thymesVar id="strings" type=""*/-->
    <div th:each="str:${strings}">
        <p th:text="${str}"></p>
    </div>
    <!--    判断  根据if 返回的bool值显示 决定是否显示后面的内容-->
    <p th:if="true">我是存在的</p>
    <input th:checked="${checked}==1?1:0" type="checkbox">
    <a th:href="'javascript:a(\''+${hello}+'\');'">点击</a>
</div>
<hr>

<br>
sdadsfdazcassaddfssdaDSSDAASDF
</body>
<script>
    function a(hello) {
        alert("js函数被调用"+hello)
    }
</script>
</html>